package com.xielun.fly.framework;

import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpSession;

@RestController
public class Controller {

    @GetMapping("/api/{json}")
    Object fly(@PathVariable String json) {
        return new FlyEngine().fly(json).getData();
    }


    @PostMapping(value = "/api")
    public Object postFly(@RequestBody String json) {
        return new FlyEngine().fly(json).getData();
    }

}